@@ -139,9 +139,23 @@ pipeline:
139139 # Fetch all branches from remote so diffuse.sh can access them
140140 echo "Fetching branches from remote..."
141141 git fetch origin --prune > /dev/null 2>&1
142- git fetch origin "$SOURCE_BRANCH:$SOURCE_BRANCH" > /dev/null 2>&1 || true
143- git fetch origin "$TARGET_BRANCH:$TARGET_BRANCH" > /dev/null 2>&1 || true
142+ git fetch origin "$SOURCE_BRANCH" > /dev/null 2>&1 || true
143+ git fetch origin "$TARGET_BRANCH" > /dev/null 2>&1 || true
144+
145+ # Debug: Show what branches/refs exist
146+ echo "=== Available branches and refs ==="
147+ git branch -r | grep -E "(${SOURCE_BRANCH}|${TARGET_BRANCH})" || true
148+ echo "Current HEAD: $(git rev-parse HEAD)"
149+ echo "origin/${SOURCE_BRANCH}: $(git rev-parse origin/${SOURCE_BRANCH} 2>/dev/null || echo 'NOT FOUND')"
150+ echo "origin/${TARGET_BRANCH}: $(git rev-parse origin/${TARGET_BRANCH} 2>/dev/null || echo 'NOT FOUND')"
151+
152+ # Use remote branch references (origin/branch-name) for the diffuse script
153+ # This ensures we compare the actual remote branches, not local refs
154+ SOURCE_REF="origin/${SOURCE_BRANCH}"
155+ TARGET_REF="origin/${TARGET_BRANCH}"
156+
144157 echo "✓ Branches fetched"
158+ echo "Will compare: $SOURCE_REF (source) vs $TARGET_REF (target)"
145159
146160 # Verify the script exists
147161 if [ ! -f "scripts/diffuse.sh" ]; then
@@ -154,12 +168,12 @@ pipeline:
154168 # Make the script executable
155169 chmod +x scripts/diffuse.sh
156170
157- # Run the diffuse script with branch parameters
158- echo "Executing: ./scripts/diffuse.sh --source '$SOURCE_BRANCH ' --target '$TARGET_BRANCH '"
171+ # Run the diffuse script with remote branch references
172+ echo "Executing: ./scripts/diffuse.sh --source '$SOURCE_REF ' --target '$TARGET_REF '"
159173
160174 # Run and capture output
161175 set +e # Don't exit on error
162- ./scripts/diffuse.sh --source "$SOURCE_BRANCH " --target "$TARGET_BRANCH " > diffuse_output_full.txt 2>&1
176+ ./scripts/diffuse.sh --source "$SOURCE_REF " --target "$TARGET_REF " > diffuse_output_full.txt 2>&1
163177 DIFFUSE_EXIT_CODE=$?
164178 set -e
165179
0 commit comments